#ifndef OPT_ARGUMENT_H
#define OPT_ARGUMENT_H

#include <QtCore>
/*! \ingroup qgetopt
    \brief The OptArgument class holds details of an argument.

    This class is a private class and instances are only created by the OptManager or OptSwitch object.
    Both of which are friend classes.

    An argument will have a \em name, and a flag indicating if it is \em mandatory.

 * \attention This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * \attention This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * \attention You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston, MA  02111-1307  USA
 *
   \author    Graeme
   \date Copyright (C) 2008-9  Graeme Foster
*/
class OptArgument
{
   friend class OptManager;
   friend class OptSwitch;
   private:

      //! The name of the argument
      QString name;

      //! Flag indicating if the argument is mandatory \em true or optional \em false.
      bool   mandatory;

      //! Private constructor
      OptArgument(QString arg);

      //! Private copy constructor for singleton class
      OptArgument(const OptArgument&);

      //! Used to display the argument in the help screen
      QString help();

      //! Return true if the argument is mandatory.
      bool isMandatory(){return mandatory;}

      //! Return true if the argument is optional.
      bool isOptional(){return !mandatory;}
};
#endif
